package com.abcgroup.hyppo.tools.editors;

import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl;

import java.util.List;
import java.beans.PropertyEditorManager;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class SimpleCollectionPropertyEditorTest {

    public static void main(String[] args) throws IllegalAccessException, InstantiationException {

        Class<CollectionPropertyEditor> ac = CollectionPropertyEditor.class;

        Object gs = ac.getGenericSuperclass();

        CollectionPropertyEditor<Long> cc = new CollectionPropertyEditor<Long>() {
            protected Long parseObject(StringBuilder f) {
                System.err.println("here");
                return Long.parseLong(f.toString().trim());
            }
        };

        cc.setAsText("1, 2, 3, 4, 5");
        List<Long> e = (List<Long>) cc.getValue();

        long pp = 1;
        for (Long aLong : e) {
            System.err.println(" " + (pp == aLong));
            pp++;
        }
    }

}
